use super::hitls_type::{HITLS_Config, HITLS_Ctx};
pub const HITLS_ALPN_ERR_OK: u32 = 0;
pub const HITLS_ALPN_ERR_ALERT_WARNING: u32 = 1;
pub const HITLS_ALPN_ERR_ALERT_FATAL: u32 = 2;
pub const HITLS_ALPN_ERR_NOACK: u32 = 3;
pub type HITLS_AlpnSelectCb = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut HITLS_Ctx,
        selectedProto: *mut *mut u8,
        selectedProtoSize: *mut u8,
        clientAlpnList: *mut u8,
        clientAlpnListSize: u32,
        userData: *mut ::std::os::raw::c_void,
    ) -> i32,
>;
unsafe extern "C" {
    pub fn HITLS_CFG_SetAlpnProtos(
        config: *mut HITLS_Config,
        alpnProtos: *const u8,
        alpnProtosLen: u32,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_CFG_SetAlpnProtosSelectCb(
        config: *mut HITLS_Config,
        callback: HITLS_AlpnSelectCb,
        userData: *mut ::std::os::raw::c_void,
    ) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_SetAlpnProtos(ctx: *mut HITLS_Ctx, protos: *const u8, protosLen: u32) -> i32;
}
unsafe extern "C" {
    pub fn HITLS_GetSelectedAlpnProto(
        ctx: *mut HITLS_Ctx,
        proto: *mut *mut u8,
        protoLen: *mut u32,
    ) -> i32;
}
